Battery charging and measurement circuit

ABSTRACT

An example device comprises a digital-to-analog converter (DAC) comprising first and second transistors coupled to a first amplifier, the second transistor coupled to a first output of the DAC and to an output of the first amplifier, and third and fourth transistors coupled to the first amplifier and to a second output of the DAC, the third and fourth transistors switchably coupled to a voltage supply and to the first transistor. The device also comprises a first node coupled to the first output of the DAC and to a resistor. The device further includes a second node coupled to the second output of the DAC, and a second amplifier coupled to the second node and to the first transistor and switchably coupled to the third and fourth transistors. The device also comprises a comparator coupled to the first node.

CROSS-REFERENCE TO RELATED APPLICATIONS

This non-provisional application claims priority to U.S. ProvisionalApp. No. 62/692,411, filed on Jun. 29, 2018 and to U.S. patentapplication Ser. No. 16/191,225, filed Nov. 14, 2018. The entiredisclosure of 62/692,411 and Ser. No. 16/191,225 are hereby fullyincorporated herein by reference.

SUMMARY

An example device comprises a digital-to-analog converter (DAC)comprising first and second transistors coupled to a first amplifier,the second transistor coupled to a first output of the DAC and to anoutput of the first amplifier, and third and fourth transistors coupledto the first amplifier and to a second output of the DAC, the third andfourth transistors switchably coupled to a voltage supply and to thefirst transistor. The device also comprises a first node coupled to thefirst output of the DAC and to a resistor. The device further includes asecond node coupled to the second output of the DAC, and a secondamplifier coupled to the second node and to the first transistor andswitchably coupled to the third and fourth transistors. The device alsocomprises a comparator coupled to the first node.

An example device comprises a digital-to-analog converter (DAC), a firstnode coupled to a first output of the DAC, a second node coupled to asecond output of the DAC and configured to couple to a battery, a firstamplifier configured to receive a first reference voltage and a voltageat the first node, the first amplifier having a first output coupled tothe DAC, a second amplifier configured to receive a second referencevoltage and a voltage at the second node, the second amplifier having asecond output coupled to the DAC, and a first comparator configured toreceive the voltage at the first node and a third reference voltage thatis a fraction of the first reference voltage. The DAC is configured toprovide a first current on the first output of the DAC based on one ofthe first and second outputs of the first and second amplifiers, providea second current on the second output of the DAC based on one of thefirst and second outputs of the first and second amplifiers, anddecrease a ratio of the second current to the first current in responseto an output of the comparator indicating that the voltage at the firstnode is below the third reference voltage.

An example mobile device comprises a first node coupled to a resistor, asecond node coupled to a battery, and a digital-to-analog converter(DAC) having a first output configured to provide a first currentthrough the resistor via the first node and a second output configuredto provide a second current via the second node to charge the battery.The mobile device also comprises a controller configured to adjust theDAC to decrease a ratio of the second current to the first current inresponse to a voltage at the first node falling below a thresholdvoltage.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 depicts a block diagram of an example battery-powered electronicdevice comprising a battery and an example battery charging andmeasurement integrated circuit (BCM IC).

FIG. 2A depicts a circuit schematic diagram of an example BCM IC.

FIG. 2B depicts an example analog OR circuit.

FIG. 3 depicts a circuit schematic diagram of an exampledigital-to-analog converter (DAC) in a BCM IC.

FIG. 4 depicts a table showing example register bit configurationsusable to control a DAC in a BCM IC.

FIG. 5 depicts waveforms describing the behaviors of currents in anexample BCM IC.

FIG. 6 depicts a flow diagram of an example method of operation for aBCM IC.

DETAILED DESCRIPTION

Various mobile electronic devices, such as smartphones, are poweredusing batteries. Charging a battery is a difficult and possiblydangerous task, as overcharging can result in excessive temperatures,fires, or explosions, and undercharging can compromise long-term batteryperformance. Battery charging should thus terminate at a specific timeand with a specific current that gradually tapers to a low level (whichis called a termination current). To achieve battery charging thatterminates at the proper time and at the proper current, the currentshould be accurately and precisely monitored, even at low levels thatare difficult to detect. Circuits presently used to measure suchtermination currents are suboptimal at least because they cannotproperly distinguish the low-level termination current from noise. Forexample, measurements of such termination currents are negativelyimpacted by noise produced by the measurement circuit, particularly whenthe noise is stronger than the termination current itself.

Described herein is a battery charging and measurement circuit. Thecircuit produces a charge current that is used to charge batteries. Thecircuit also produces a proxy current (equivalently called a sensecurrent) that is a fraction of the amplitude of the charge current. Theamplitude curves of the charge and proxy currents are thus similar. Asthe battery nears completion of charging, the charge current becomessmall. Because the proxy current is a fraction of the charge current,when the charge current becomes small, the proxy current also becomessmall, often too small to accurately and precisely measure. Accordingly,in response to a voltage corresponding to the proxy current droppingbelow a threshold level, the circuit boosts the amplitude of the current(and, thus, the voltage) to a range that is readily measureable withaccuracy and precision despite circuit noise. The circuit boosts theamplitude by shifting a bit register, the bits of which are used tocontrol the proxy and charge currents, as is explained in greater detailbelow. Each time the voltage drops below the threshold level, thecircuit again boosts the amplitude of the proxy current (and, thus, thevoltage) so that the voltage is again readily measureable despitecircuit noise. This iterative process continues a finite number oftimes, e.g., until it is likely safe to terminate charging. In thismanner, the proxy current is readily, accurately, and preciselymeasurable (even when charging is nearly complete), and theabove-described problems are mitigated.

FIG. 1 depicts a block diagram of an example battery-powered electronicdevice 100, such as a mobile device (e.g., a smartphone). The electronicdevice 100 comprises a battery 102 and a battery charging andmeasurement integrated circuit (BCM IC) 104 coupled to the battery 102.The battery 102 is any suitable type of battery that is capable ofproviding power to the electronic device 100 to enable the electronicdevice 100 to perform its intended functions. In an example, the BCM IC104 is a single chip housed inside a package. In an example, the BCMcircuitry is distributed across multiple chips, with all such chipshoused inside a single package. Other variations on the preciseconfiguration of the BCM circuit are contemplated and included withinthe scope of this disclosure. The BCM IC 104 couples to a port 106 towhich a power supply can couple. For example, a user is able to connectthe port 106 to mains power via an adapter. FIG. 1 is merely an exampledevice in which the BCM IC 104 can be implemented. Other applications,which include various other devices that use rechargeable batteries,will also find benefit with the BCM IC 104.

In operation, the BCM IC 104 receives power via the port 106 and usesthe power to charge the battery 102. Specifically, the BCM IC 104implements the techniques alluded to above and described in greaterdetail below to achieve greater accuracy and precision in proxy currentmeasurements when charging the battery 102. As explained, thesetechniques are especially helpful when charging of the battery 102 isnearly complete and the charging current has been reduced to arelatively small termination current that is difficult to accurately andprecisely measure.

FIG. 2A depicts a circuit schematic diagram of an example BCM IC 104.The BCM IC 104 includes a digital-to-analog converter (DAC) 200. The DAC200 has a first output that couples to a node 202 and a second outputthat couples to a node 208. The node 202 couples to a resistor 204which, in turn, couples to ground 206. The resistance of the resistor204 can be selected as desired to realize the functions describedherein. The node 208 couples to a battery 210, represented in FIG. 2A asa capacitor. The battery 210, in turn, couples to ground 206. The node202 also couples to an amplifier 220 (e.g., a differential amplifier), acomparator 236, and a comparator 238. The node 208 couples to anamplifier 216 (e.g., a differential amplifier).

The amplifier 220 comprises two inputs: an input 221, which receives avoltage VFB_CC from node 202 via connection 212, and an input 222, whichreceives a reference voltage VREF_CC from any suitable source ofreference signals (e.g., other circuitry on the IC). The amplifier 216comprises two inputs: an input 217, which receives a voltage VFB_CV fromnode 208 via connection 214, and an input 218, which receives areference voltage VREF_CV from any suitable source of reference signals.The comparator 238 comprises two inputs: an input 241, which receivesthe voltage VFB_CC from node 202 via connection 212, and an input 242,which receives a reference voltage VREF_TERM from any suitable source ofreference signals. The comparator 236 comprises two inputs: an input239, which receives VFB_CC from node 202 via connection 212, and aninput 240, which receives a reference voltage that is a fraction ofVREF_CC (e.g., one-half of VREF_CC, or 0.5(VREF_CC)). The fraction maybe set as desired, with practical considerations in selecting fractionvalues described in greater detail below.

The BCM IC 104 additionally includes an analog OR circuit 224 toimplement a logic OR functionality. The analog OR circuit 224 receivesthe outputs of the amplifiers 216, 220 as inputs and provides signalVCTRL as an output on connection 232. An example analog OR circuit 224is depicted in FIG. 2B. The analog OR circuit 224 comprises p-typeMOSFETs 260, 270, 272, and 282 having their sources coupled to voltagesource 228. A drain of the p-type MOSFET 260 couples to the gate of thep-type MOSFET 260 and to a drain of n-type MOSFET 262. A gate of then-type MOSFET 262 couples to the output of amplifier 220. The source ofthe n-type MOSFET 262 couples to node 280, which, in turn, couples to adrain of n-type MOSFET 266. The source of n-type MOSFET 266 couples toground. A gate of the n-type MOSFET 266 couples to a gate of n-typeMOSFET 264. The source of n-type MOSFET 264 couples to ground. The drainof n-type MOSFET 264 couples to a current source 268, which couples tovoltage source 228. The drain of the n-type MOSFET 264 couples to thegates of n-type MOSFETs 264 and 266.

The gates of the p-type MOSFETs 260, 270 are tied together. A drain ofthe p-type MOSFET 270 couples to the drain of n-type MOSFET 276. Thesource of n-type MOSFET 276 couples to ground and a gate of the n-typeMOSFET 276 couples to the gate of the n-type MOSFET 266. The drain ofthe n-type MOSFET 276 couples to a digital buffer 274, which produces anoutput CC_ACTIVE.

The node 280 couples to a source of n-type MOSFET 278, the gate of whichcouples to the output of amplifier 216. The drain of the n-type MOSFET278 couples to the drain of p-type MOSFET 272. The gate of p-type MOSFET272 couples to the gate of p-type MOSFET 282. The drain of p-type MOSFET282 couples to the drain of n-type MOSFET 286, the gate of which couplesto the gate of n-type MOSFET 276 and the source of which couples toground. The drain of p-type MOSFET 282 couples to digital buffer 284,the output of which is CV_ACTIVE.

The node 280 couples to the gate of p-type MOSFET 290. A drain of p-typeMOSFET 290 couples to resistor 292, which couples to ground. The drainof p-type MOSFET 290 also couples to the gate of n-type MOSFET 294, thesource of which couples to ground. The source of p-type MOSFET 290 andthe drain of n-type MOSFET 294 couple together at node 296, whichcouples to connection 232 and provides output signal VCTRL to connection232. The node 296 couples to current source 288, which couples to thevoltage source 228.

Referring again to FIG. 2A, the BCM IC 104 comprises a controller 248,such as a processor. The controller 248 stores a multi-bit (e.g., m-bit)register 250. In an example, the register 250 is an 8-bit register,although any number of bits is usable. Practical considerations ofselecting various register sizes are described in greater detail below.The controller 248 controls the contents of the register 250, forexample by shifting bits to the left or to the right or by overwritingbits. The output of the comparator 236 couples to the controller 248 viaa connection 244 that provides a SHIFT signal to the controller 248. Theoutput of the comparator 238 couples to the controller 248 via aconnection 246 that provides a termination (TERM) signal to thecontroller 248. Other configurations of and various modifications to theBCM IC 104 are contemplated and included within the scope of thisdisclosure. The controller 248 couples to the DAC 200 via connections252.

The operation of the BCM IC 104 is described by first referring only tothe components other than the controller 248 and the comparators 236 and238, and then explaining the function of the controller 248 and thecomparators 236 and 238. The DAC 200 outputs a current to the node 202and outputs another current to the node 208. The current output to thenode 208 is termed a charging current, since that current is provided tothe battery 210 for charging. The current output to the node 202 istermed a proxy current, since the proxy current is a smaller fraction ofthe charging current. (The ratio between the proxy and charging currentsis set using a network of appropriately-sized transistors housed withinthe DAC 200, as will be described further below.)

The charging current charges the battery 210. As the battery 210charges, the voltage at node 208 rises. The voltage at node 208 is thususable to monitor the charging status of the battery 210. However, it isnot usable to monitor the amplitude of the charging current itself. Theproxy current, which is a smaller fraction of the charging current, ishelpful in this regard. By passing the proxy current through theresistor 204 and monitoring the voltage at node 202, the proxy currentamplitude can be monitored. Thus, in effect, the voltage at node 202serves as a proxy for the amplitude of the proxy current, and theamplitude of the proxy current serves as a proxy for the amplitude ofthe charging current. Accordingly, by monitoring the voltage at node202, the amplitude of the charging current is likewise monitored.

The amplifier 216 produces an output based on the difference between thevoltage at node 208 and VREF_CV. The amplifier 220 produces an outputbased on the difference between the voltage at node 202 and VREF_CC.Referring to FIG. 2B, the output of amplifier 216 couples to the gate ofn-type MOSFET 278, and the output of amplifier 220 couples to the gateof n-type MOSFET 262. The n-type MOSFETs 262, 266 form an NMOS sourcefollower. The n-type MOSFETs 278, 266 form another NMOS source follower.The MOSFETs 290, 294 form a super source follower. The analog ORfunction is primarily implemented by the n-type MOSFETs 262, 278. Theoutput of amplifier 220 turns on the n-type MOSFET 262 fully or weakly,depending on the signal applied to the gate terminal of the n-typeMOSFET 262. Similarly, the output of amplifier 216 turns on the n-typeMOSFET 278 fully or weakly, depending on the signal applied to the gateterminal of the n-type MOSFET 278. The source of n-type MOSFET 262follows the gate of n-type MOSFET 262, and the same is true for thesource and gate of n-type MOSFET 278. Whichever of the two MOSFETs 262,278 is more strongly turned on will pass most (e.g., 90% or more) of thecurrent 10 generated by the current source 268 and mirrored by theMOSFETs 264, 266 to node 280. The sources of the MOSFETs 262, 278 coupleat node 280, meaning that whichever of the two MOSFETs is most stronglyturned on and has a current contribution to node 280 that dominates thenode 280 will be the main driver of the gate of p-type MOSFET 290. Thesource of the p-type MOSFET 290 follows the gate of the p-type MOSFET290. Thus, the gate signal drives VCTRL on node 296 at connection 232.(As explained in detail below, VCTRL controls the proxy and chargingcurrents by controlling the drain-source channels of the transistors inthe DAC 200.)

The n-type MOSFET 294 acts as a super source follower that lowers theimpedance on node 296 and adds stability to VCTRL. The n-type MOSFET 294pulls down the node 296 (VCTRL) as a result of current flowing throughthe resistor 292 (and thus turning on the n-type MOSFET 294) when p-typeMOSFET 290 is turned on. The p-type MOSFET 290, in turn, is turned onwhen node 280 goes low.

The MOSFETs 260, 270, and 276 and the digital buffer 274 form a currentcomparator that detects when the amplifier 220 dominates VCTRL, and theMOSFETs 272, 282, and 286 and the digital buffer 284 form anothercurrent comparator that detects when the amplifier 216 dominates VCTRL.The digital buffer 274 produces an output CC_ACTIVE that indicateswhether or not the amplifier 220 dominates VCTRL, and the digital buffer284 produces an output CV_ACTIVE that indicates whether or not theamplifier 216 dominates VCTRL. When CC_ACTIVE is high, CV_ACTIVE is low,and vice versa. Specifically, in the case where the amplifier 220 isstrongly turns on the n-type MOSFET 262, the majority (e.g., 90%) of thecurrent 10 flows through MOSFETs 262, 260, and 270, while asubstantially smaller current flows through the n-type MOSFET 276. Thegreater current through p-type MOSFET 270 relative to the currentthrough n-type MOSFET 276 pulls up the input to the digital buffer 274,causing CC_ACTIVE to be high. Conversely, when the amplifier 220 is notstrongly turned on, the current flowing through MOSFETs 262, 260, and270 is significantly lower (e.g., 10% of the IO current). In thissituation, the current through n-type MOSFET 276 is greater than currentthrough p-type MOSFET 270, thus pulling the input to the digital buffer274 down and causing CC_ACTIVE to be low. A similar principle applies tothe operation of the current comparator formed by MOSFETs 272, 282, 286,and the digital buffer 284.

The CC_ACTIVE and/or CV_ACTIVE signals are provided to and usable by thecontroller 248 to, e.g., perform the steps of the method 600, which isdescribed below. In the relatively early stages of charging the battery210, the voltage at node 208 is far below VREF_CV. As a result, theoutput of the amplifier 216 is small, and the amplifier 216 thus doesnot control VCTRL. The amplifier 220, however, does control VCTRL,because the amplifier 220 operates in a feedback loop whereby theamplifier 220 adjusts its output (VCTRL) in an attempt to equalize itstwo inputs. Thus, the voltage at node 202 is substantially equivalent toVREF_CC. (The amplifier 216 also attempts to equalize its inputs, but todo so, the battery 210 is to be charged to a point that the voltage atnode 208 is equivalent to VREF_CV, which is a time-consuming process.The voltage at node 202 adapts more quickly because it connects to aresistor 204 instead of a battery.)

For the reasons just described, in the early stages of the chargingprocess, the voltage at node 202 is roughly equivalent to the valueselected for VREF_CC, and thus the proxy current is set by the valueselected for VREF_CC. The charging current is a function of the proxycurrent according to a ratio set by the network of transistors withinthe DAC 200 (described below). In an example, the charging current is 2×the proxy current. In an example, the charging current is 4× the proxycurrent. Other ratios are contemplated and included in the scope of thisdisclosure.

In these early stages of the charging process, therefore, the battery210 continues to charge at a rate that is determined by the chargingcurrent amplitude, which, in turn, is determined by the proxy current,which, in turn, is determined by the voltage at node 202, which, inturn, is determined by value selected for VREF_CC. However, there comesa point in time when the battery 210 is sufficiently charged that thevoltage at node 208 is close enough to VREF_CV that the output of theamplifier 216 dominates the output of the amplifier 220 and takescontrol of VCTRL, as described above with respect to FIG. 2B. The VCTRLsignal continues to decrease as the battery 210 approaches a fullycharged status, which causes the charging current to decrease as well.As the amplifier 220 no longer controls the proxy current, the proxycurrent is now a function of the charging current. As explained above,in examples, the proxy current is a smaller fraction of the chargingcurrent according to a ratio set by the transistor network within theDAC 200 (described in detail below).

As the charging current continues to decrease due to the battery 210continuing to charge, the proxy current likewise decreases. Although theamplifier 220 has minimal or no effect on VCTRL, the voltage at node 202is still used by the comparator 238 to determine when the chargingprocess should be terminated. If the voltage at the node 202 is so smallthat it is difficult to accurately interpret (e.g., due to being maskedby noise), the comparison performed by the comparator 238 between thevoltage at node 202 and VREF_TERM can be flawed. In such instances, theTERM signal can be asserted (or, in some examples, de-asserted) atinappropriate times.

Accordingly, it is beneficial to repeatedly increase the voltage at node202 when the voltage at node 202 drops below a threshold, therebyproviding an easy-to-read voltage at node 202. This is at least part ofthe function of the comparator 236, the controller 248, the register250, and the DAC 200, as is now described with respect to FIG. 3 .

FIG. 3 depicts a circuit schematic diagram of an example DAC 200 in aBCM IC 104. As mentioned above, the DAC 200 includes a network oftransistors, which are now described and which, in at least someexamples, are metal oxide semiconductor field effect transistors(MOSFETs), such as p-type MOSFETs. The network of transistors in the DAC200 includes a transistor 300 having a source terminal coupled to avoltage supply 228 and a drain terminal coupled to the source terminalof a transistor 302. The drain terminal of the transistor 302 couples tothe node 202. (The node 202 is not part of the DAC 200.) The drainterminal of the transistor 300 and the source terminal of the transistor302 couple to an inverting input of an amplifier 312 (e.g., differentialamplifier). The output of the amplifier 312 couples to a gate terminalof the transistor 302 and adjusts the drain-source channel of thetransistor 302 in an attempt to equalize the voltages at the drains ofthe transistors 300 and the transistors 304.1, 304.2, . . . , 304.m. Thegate terminal of the transistor 300 couples to the connection 232(VCTRL) at a node 310.

The network of transistors in the DAC 200 further comprises a set oftransistors that couple to the node 208. (The node 208 is not part ofthe DAC 200.) In an example, the set of transistors includes transistors304.1, 304.2, . . . , 304.m, where m corresponds to the number of bitsin the register 250. In an example, the transistors 304.1, 304.2, . . ., 304.m are sized in an ascending manner relative to the transistor 300.For example, assuming transistor 300 has a size of 1×, the transistor304.1 has a size of 1×, the transistor 304.2 has a size of 2×, and thetransistor 304.m has a size of 2^((m-1))×. Thus, in this example, thetransistor 304.m is substantially larger in size than the transistor304.1, and the transistor 304.1 is the same size as the transistor 300.Other sizing configurations are contemplated.

The source terminals of the transistors 304.1, 304.2, . . . , 304.mcouple to the voltage supply 228. The drain terminals of thesetransistors couple to each other, to the non-inverting input to theamplifier 312, and to the node 208. Each of the gate terminals of thesetransistors 304.1, 304.2, . . . , 304.m is switchably coupled to thevoltage supply 228 and is switchably coupled to the gate terminal of thetransistor 300 at node 310. For example, the gate terminal of thetransistor 304.1 is switchably coupled to the voltage supply 228 viaswitch 308.1 and is switchably coupled to the node 310 via switch 306.1.In an example, the switches 308.1 and 306.1 are MOSFETs. In an example,the switches 308.1 and 306.1 are p-type and complementary (CMOS)MOSFETs, respectively, and are controlled by a signal on a connection252.1 from the controller 248.

The gate terminal of the transistor 304.2 is switchably coupled to thevoltage supply 228 via a switch 308.2 (e.g., a p-type MOSFET) and to thenode 310 via a switch 306.2 (e.g., a CMOS). The switches 308.2 and 306.2are controlled by a signal on a connection 252.2 from the controller248.

The gate terminal of the transistor 304.m is switchably coupled to thevoltage supply 228 via a switch 308.m (e.g., a p-type MOSFET) and to thenode 310 via a switch 306.m (e.g., a CMOS). The switches 308.m and 306.mare controlled by a signal on a connection 252.m from the controller248.

The signals on connections 252.1, 252.2, . . . , 252.m from thecontroller 248 are based on bits in the register 250. In an example, thesignal on connection 252.1 depends on the value of the least significantbit in the register 250, the signal on connection 252.2 depends on thevalue of the second-least significant bit in the register 250, and thesignal on connection 252.m depends on the most significant bit in theregister 250. For example, the controller 248 provides a high signal onconnection 252.1 in response to the least significant bit in theregister 250 being a 1, and a low signal on connection 252.1 in responseto the least significant bit in the register 250 being a 0. Similarly,the controller 248 provides a high signal on connection 252.2 inresponse to the second-least significant bit in the register 250 being a1, and a low signal on connection 252.2 in response to the second-leastsignificant bit in the register 250 being a 0. Likewise, the controller248 provides a high signal on connection 252.m in response to the mostsignificant bit in the register 250 being a 1, and a low signal onconnection 252.m in response to the most significant bit in the register250 being a 0. These conventions can be modified as desired.

The operation of the DAC 200 is now described in tandem with FIGS. 2 and3 . As explained above, it is possible that the voltage at node 202becomes so low (particularly when charging is almost complete) that itis difficult to accurately interpret the voltage and thus properlyterminate charging of the battery 210. In such instances, as alsoexplained above, it is beneficial to repeatedly boost the amplitude ofthe voltage at node 202 in response to that voltage dropping below athreshold. Boosting the voltage in this manner facilitates accurate andprecise interpretation of the voltage at node 202. The manner in whichthis voltage is increased is now described.

When the voltage at node 202 drops below the reference voltage (e.g.,0.5*VREF_CC) at input 240, the SHIFT signal is asserted. In response toassertion (or, in examples, de-assertion) of SHIFT, the controller 248shifts the bits in the register 250 to the right by one bit. Thus, forexample, the bit that was previously in the least significant bitlocation is no longer in the register 250, while the bit that waspreviously in the most significant bit location is now in thesecond-to-most significant bit location, and the most significant bitlocation is populated with a 0 bit. (Each shift to the right in thismanner is equivalent to dividing the digital bit value by two.) In thismanner, the transistor 304.m, which has a size 2^((m-1))× relative tothe size 1× of the transistor 300, is turned off, since the mostsignificant bit of the register 250 is now populated with a 0. Each timethe bits in the register 250 are adjusted due to the voltage at node 202dropping below the threshold at input 240, more transistors 304.1,304.2, . . . , 304.m turn off. Each time one or more transistors 304.1,304.2, . . . , 304.m turns off, the ratio of the charging current to theproxy current decreases, since there are fewer transistors 304.1, 304.2,. . . , 304.m contributing current to the charging current provided tonode 208. This process is iteratively repeated until only the transistor304.1 remains on, while the rest of the transistors 304.2, . . . , 304.mare off. In an example, transistor 304.1 has a 1:1 sizing ratio relativeto the transistor 300, and so the proxy and charging currents are thesame. At this point in time, the charging current and proxy current areboth very small, the battery 210 is nearly fully charged, and thecharging process is suitable for termination.

FIG. 4 depicts a table showing example register bit configurationsusable to control the DAC 200. Specifically, FIG. 4 depicts exampleregister values 416, 418, 420, 422, 424, 426, 428, and 430, each ofwhich is illustrative of the state of the register 250 as the bits ofthe register 250 are shifted to the right each time the voltage at node202 drops below the reference voltage at input 240 (FIG. 2A). Thenumerals 400, 402, 404, 406, 408, 410, 412, and 414 are arranged inorder of decreasing bit position significance, with numeral 400indicating the most significant bit and numeral 414 indicating the leastsignificant bit. Although eight bits are shown in the registers, anynumber of bits can be selected.

Register value 416 begins with an illustrative bit configuration of11111111. When this configuration is present in the register 250, eachof the transistors 304.1, 304.2, . . . , 304.m is on. For example,because the most significant bit (numeral 400) for register 416 containsa 1, the connection 252.m carries a high signal, which closes switch306.m and opens switch 308.m. Accordingly, VCTRL is provided to the gateterminal of transistor 304.m, and VCTRL is less than the voltage supply228 at the source terminal of the transistor 304.m. Because thetransistor 304.m is a PMOS and the source terminal is sufficiently lowerin voltage than the gate terminal, the transistor 304.m turns on. Thesame is true for the remaining transistors 304.1, . . . , 304.m−1.Because all of these transistors are on, the charging current is muchlarger than the proxy current.

Although the charging current is significantly larger than the proxycurrent, the charging current will decrease over time when the amplifier216 controls VCTRL (FIG. 2A), since the battery 210 is approaching fullcharge. Accordingly, when the charging current decreases, the proxycurrent decreases, which eventually causes the voltage at node 202 todrop below the reference voltage at input 240. When this occurs, SHIFTis asserted, which causes the controller 248 to shift the bits in theregister 250 one bit to the right. This shift causes the register 250 tocontain bits similar to those shown in register value 418, with the mostsignificant bit replaced with a 0. This causes all transistors 304.1,304.2, . . . , 304.m−1 to remain on, but transistor 304.m turns off.Because transistor 304.m turns off, the sizing ratio of the remainingtransistors 304.1, 304.2, . . . , 304.m to the transistor 300 decreases.This results in a greater proxy current relative to the chargingcurrent, and thus the voltage at node 202 is boosted above the referencevoltage at input 240.

Over time, the voltage at node 202 will again fall below the referencevoltage at input 240 for the reasons described above. Thus, the SHIFTsignal will again be asserted, and the controller 248 will again shiftthe bits in the register 250 so that the register 250 appears asregister value 420. The bit string 00111111 causes the transistors304.m-1 and 304.m to both turn off, thus again boosting the proxycurrent and the voltage at node 202. This process iteratively repeatsuntil the register 250 appears as register value 430, with only thetransistor 304.1 remaining on. In this situation, the ratio betweentransistors 304.1 and 300 is 1:1, meaning that the proxy and chargingcurrents are approximately equal. No further boosting of the voltage atnode 202 will occur, but the number of transistors 304.1, 304.2, . . . ,304.m, the number of bits in the register 250, and the fraction by whichVREF_CC is multiplied to produce the reference voltage at input 240 areall selected so that termination of charging would be appropriate whenthe ratio reaches 1:1 and no further boosting would be necessary.

When the fraction that is multiplied with VREF_CC to produce thereference voltage at input 240 is relatively high, the comparator 236will trip more frequently. As a result, the controller 248 will shiftthe bits in the register 250 more often. It is possible that the bits ofthe register 250 could be completely shifted out of the register 250before charging of the battery 210 is complete (or nearly complete),which should be avoided. This problem may be mitigated by selecting aregister 250 of a large size (large number of bits), which will maintainfrequent boosts for the voltage at node 202 without exhausting theregister 250 prematurely. The tradeoff for this approach, however, isthe increased circuitry requirements for the DAC 200, since each bit inthe register 250 corresponds to a separate transistor and attendantswitching circuitry in the DAC 200. When the fraction is relatively low,the comparator 236 will trip less frequently, and the problems abovewill be avoided. However, the voltage at node 202 may become too low andmay cause the inadvertent tripping of the comparator 238, which is alsoto be avoided. Accordingly, a moderate value of approximately one-half(0.5) may be selected as the fraction with which VREF_CC is multipliedto produce the reference voltage at input 240.

FIG. 5 depicts current waveforms 500 and 502, which correspond to theproxy current and charging current, respectively. The waveforms 500 and502 describe the behaviors of these currents as a function of time. Theproxy current and charging current begin at constant current levels, asnumerals 504 and 506 depict. During this period of time, the amplifier220 is in control of VCTRL. At the time indicated by numeral 508, theamplifier 216 gains control of VCTRL due to the rising battery voltage.As a result, the charging current decreases, as numeral 510 indicates.(The CV label indicates that the amplifier 216 is in control of VCTRLduring this time period.) Because the charging current decreases asnumeral 510 indicates, the proxy current follows it and also decreases,as numeral 512 indicates. Eventually, the proxy current reaches a levelat time 514 at which the voltage at node 202 falls below the referencevoltage at input 240. As a result, the SHIFT signal is asserted, causingthe bits in the register 250 to shift to the right one place. Thiscauses one of the transistors 308 to turn off, thereby decreasing theratio of the charge current to the proxy current and thus boosting theproxy current, at numeral 516 indicates. Consequently, the amplifier 220regains control of VCTRL, as the label CC indicates, and the currentsremain constant until the amplifier 216 again regains control of VCTRLat time 518 due to the charge of the battery 210 relative to thereference voltage at input 218. The process then repeats with bothcurrents again falling in amplitude, as numerals 520, 522 indicate. Asthis iterative process continues, the charging current continues todiminish in amplitude until the transistor sizing ratio betweenwhichever ones of the transistors 304.1, 304.2, . . . , 304.m that arestill on and the transistor 300 is approximately 1:1. At that point, thecharging process terminates, with the benefit of a small andprecisely-controlled termination charging current. Because no furtherboosting occurs, the proxy current decreases until the comparator 238asserts the TERM signal. In response to assertion (or, in examples,de-assertion) of TERM, the controller 248 disconnects the voltage supplyfrom the remainder of the BCM IC 104 (e.g., the DAC 200), for exampleusing a switch. In an alternative example, the TERM signal is provideddirectly to a switch instead of to the controller 248, in which case theasserted TERM signal causes switch to open. Opening the switchdisconnects the voltage supply to the DAC 200.

FIG. 6 depicts a flow diagram of an example method 600 of operation fora BCM IC 104. One or more of these steps may be performed by thecontroller 248. The method 600 begins with determining whether theamplifier 216 is in control of the proxy and charging currents (e.g.,whether the amplifier 216 is in control of VCTRL) (602). This may bedetermined using the CC_ACTIVE and/or CV_ACTIVE signals described abovewith respect to FIG. 2B. If not, 602 is repeated. Otherwise, the method600 continues by determining whether the voltage at node 202 is lessthan the threshold voltage at input 240 (604). If not, 604 is repeated.Otherwise, the method 600 comprises shifting the bit register (606). Themethod 600 then comprises determining whether the transistor sizingratio between whichever ones of the transistors 304.1, 304.2, . . . ,304.m that are still on and the transistor 300 is approximately 1:1(608). If not, control of the method 600 returns to 604. Otherwise, themethod 600 comprises determining whether the voltage at node 202 isequal to (or less than) the terminal reference voltage, which is thevoltage at which charging should terminate (610). If not, 610 isrepeated. Otherwise, charging is terminated (612).

In the foregoing discussion and in the claims, the terms “including” and“comprising” are used in an open-ended fashion, and thus should beinterpreted to mean “including, but not limited to . . . .” An elementor feature that is “configured to” perform a task or function may beconfigured (e.g., programmed or structurally designed) at a time ofmanufacturing by a manufacturer to perform the function and/or may beconfigurable (or re-configurable) by a user after manufacturing toperform the function and/or other additional or alternative functions.The configuring may be through firmware and/or software programming ofthe device, through a construction and/or layout of hardware componentsand interconnections of the device, or a combination thereof.Additionally, uses of the phrases “ground” or similar in the foregoingdiscussion are intended to include a chassis ground, an Earth ground, afloating ground, a virtual ground, a digital ground, a common ground,and/or any other form of ground connection applicable to, or suitablefor, the teachings of the present disclosure. Unless otherwise stated,“about,” “approximately,” or “substantially” preceding a value means+/−10 percent of the stated value.

The above discussion is meant to be illustrative of the principles andvarious embodiments of the present disclosure. Numerous variations andmodifications will become apparent to those skilled in the art once theabove disclosure is fully appreciated. It is intended that the followingclaims be interpreted to embrace all such variations and modifications.

What is claimed is:
 1. A device, comprising: a digital-to-analogconverter (DAC) having a DAC input and first and second DAC outputs; afirst amplifier having first and second amplifier inputs and a firstamplifier output, wherein the first amplifier input is coupled to afirst reference terminal providing a first reference voltage, the secondamplifier input is coupled to the first DAC output, and the firstamplifier output is coupled to the DAC input; a second amplifier havingthird and fourth amplifier inputs and a second amplifier output, whereinthe third amplifier input is coupled to a second reference terminalproviding a second reference voltage, the fourth amplifier input iscoupled to the second DAC output, and the second amplifier output iscoupled to the DAC input; and a comparator having first and secondcomparator inputs and a comparator output, wherein the first comparatorinput is coupled to the first DAC output, the second comparator input iscoupled to a third reference terminal providing a third referencevoltage that is a fraction of the first reference voltage; wherein theDAC is configured to: provide a first current at the first DAC outputresponsive to one of the first amplifier output and the second amplifieroutput; provide a second current at the second DAC output responsive toone of the first amplifier output and the second amplifier output; anddecrease a ratio of the second current to the first current responsiveto the comparator output indicating that a voltage at the first DACoutput is lower than the third reference voltage.
 2. The device of claim1, further comprising a resistor coupled between the first DAC outputand a ground terminal.
 3. The device of claim 1, further comprising acontroller having a register containing multiple bits, wherein thecontroller is configured to adjust the ratio responsive to the multiplebits.
 4. The device of claim 3, wherein the controller is configured toshift the multiple bits in the register in response to the comparatoroutput indicating that the voltage at the first DAC output is lower thanthe third reference voltage.
 5. The device of claim 4, wherein thecontroller is configured to shift the multiple bits in the register in aright-to-left direction such that the shift causes a bit to move from aless significant bit position to a more significant bit position.
 6. Thedevice of claim 1, wherein the fraction is approximately one-half. 7.The device of claim 1, wherein the DAC includes: a third amplifierhaving fifth and sixth amplifier inputs and a third amplifier output; afirst transistor coupled between a voltage supply and the fifthamplifier input, and having a first control terminal coupled to thefirst and second amplifier outputs; a second transistor coupled betweenfifth amplifier input and the first DAC output, and having a secondcontrol terminal coupled to the third amplifier output; and at least twoadditional transistors, each of the at least two additional transistorscoupled between the voltage supply and the sixth amplifier input, andhaving respective control terminals each coupled to the voltage supplythrough a first respective switch and to the first control terminalthrough a second respective switch; wherein the controller is configuredto control the respective first and second switches of each of the atleast two additional transistors responsive to a different bit of themultiple bits.
 8. The device of claim 7, wherein each of the firstswitches is a p-type field effect transistor (PFET) and each of thesecond switches is an n-type field effect transistors (NFET), andwherein the first, second, and the at least two additional transistorsare PFETs.
 9. The device of claim 1, further comprising a secondcomparator configured to compare a voltage at the first DAC output to atermination reference voltage.
 10. A mobile device, comprising: adigital-to-analog converter (DAC) having a DAC input and first andsecond DAC outputs, wherein the DAC is configured to provide a firstcurrent through a resistor at the first DAC output, and to provide asecond current at the second DAC output to a battery; and a controllerconfigured to adjust the DAC to decrease a ratio of the second currentto the first current responsive to a voltage across the resistor fallingbelow a threshold voltage.
 11. The mobile device of claim 10, whereinthe controller is configured to store multiple bits in a register, andwherein the controller is configured to configure switches in the DACbased on the multiple bits, and the first and second currents arecontrolled by the configurations of the switches in the DAC.
 12. Themobile device of claim 11, wherein the controller is configured to shiftthe multiple bits in the register in response to the voltage across theresistor falling below the threshold voltage.
 13. The mobile device ofclaim 10, further comprising a comparator having first and secondcomparator inputs and a comparator output, wherein the first comparatorinput is coupled to the resistor, the second comparator input is coupledto a second threshold terminal providing a second threshold voltage, andthe comparator output provides a signal to terminate charging of thebattery.